#
# Copyright (C) 2008 Erik van Oosten
#
# MIT license.
#

# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application'

class RadiantpostfixextensionExtension < Radiant::Extension
  version "1.0"
  description "Radiant extension to manage a Postfix virtual domain."
  url "http://code.google.com/p/radiantpostfixextension"
  
  define_routes do |map|
    map.connect 'admin/email/:action', :controller => 'email'
  end
  
  def activate
    admin.tabs.add "Email", "/admin/email", :after => "Layouts", :visibility => [:all]
    EmailController.class_eval { session :disabled => false }
  end
  
  def deactivate
    admin.tabs.remove "Email"
  end
  
end
